//好友表	
var mongoose = require('mongoose');


var friendSchema = new mongoose.Schema({
    user_id: { type: mongoose.SchemaTypes.ObjectId, ref: 'user_login' }, // '用户ID',
    friend_id: { type: mongoose.SchemaTypes.ObjectId, ref: 'user_login'}, // '好友ID',
	Unread_number: { type: Number, default:0},//未读数量
    // news:{ type: mongoose.SchemaTypes.ObjectId,ref: 'Chat'},//最新信息
    latest_information:{ type :String ,default:''},  //最新信息
    latest_information_time:{type:Date ,default:new Date},  //最新信息发布的时间
})




module.exports = mongoose.model('friend', friendSchema)  